<?php

namespace App\Http\Controllers;

use Storage;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class VersionController extends BaseController
{
    public $fileRepo;

    public function __construct()
    {
    }

    public function jump()
    {
        $data = [
            'version'=> env('API_VERSION'),
            'time' => date('Y-m-d H:i:s'),
            'project_name' => 'chinareach',
            'php_version'=>PHP_VERSION,
            'os'=>PHP_OS,
            'server'=> $_SERVER ['SERVER_SOFTWARE'],
            'upload'=>get_cfg_var("upload_max_filesize"),
            'ip'=>GetHostByName($_SERVER['SERVER_NAME']),
            'Laravel'=>app()->version()
        ];

        return response($data, 200);
    }

    /**
     * 系统系统
     */
    public function index()
    {
        $data = [
            'version'=> env('API_VERSION'),
            'time' => date('Y-m-d H:i:s'),
            'project_name' => 'chinareach',
            'php_version'=>PHP_VERSION,
            'os'=>PHP_OS,
            'server'=> $_SERVER ['SERVER_SOFTWARE'],
            'upload'=>get_cfg_var("upload_max_filesize"),
            'ip'=>GetHostByName($_SERVER['SERVER_NAME']),
            'Laravel'=>app()->version()
        ];

        return response($data, 200);
    }

}
